
import { Entity, PrimaryUuid, MemberId, CouponId, CreateDate, DateTime, Remark, Code, CouponUseTo, CouponLogStatus, CouponCanUseTo } from '@sker/core'

@Entity({ name: 'coupon_log', comment: '优惠券发放记录' })
export class CouponLog {
    @PrimaryUuid({
        primaryKeyConstraintName: "PK_COUPON_LOG_ID"
    })
    id!: string;

    @Code({ comment: '条码' })
    code!: string;

    @MemberId({})
    member_id!: string;

    @CouponId()
    coupon_id!: string;

    @CouponLogStatus({ comment: '状态' })
    status: boolean;

    @Remark()
    remark: string;

    @CouponCanUseTo({ comment: '使用场景' })
    use_to: string;

    @DateTime({ comment: '过期时间' })
    expired_date: Date;

    @DateTime({ comment: '使用时间' })
    last_use_date: Date;

    @CreateDate({ comment: '领取时间' })
    create_date: Date;
}
